package com.sk.sqd.context;

import com.sk.sqd.strategy.Strategy;

/**
 * 上下文
 */
public class Context {

    private Strategy strategy;

    public Context() {
    }

    /**
     * 初始化时传入具体的策略对象
     * @param strategy 具体的策略对象
     */
    public Context(Strategy strategy) {
        this.strategy = strategy;
    }

    /**
     * 上下文接口
     */
    public void contextInterface() {
        strategy.algorithmInterface();
    }

}
